<template>
  <je-modal
    v-model:visible="visibleModule"
    :width="width"
    title="说明"
    height="auto"
    :resize="false"
    ok-button
    button-align="right"
    :maximizable="false"
    @close="cancelModal"
  >
    <div v-html="modalContext"> </div>
  </je-modal>
</template>
<script>
  import { defineComponent, ref } from 'vue';
  import { Modal } from '@jecloud/ui';
  export default defineComponent({
    name: 'Explain',
    components: {
      JeModal: Modal,
    },
    props: {
      modalContext: {
        type: String,
        default: '',
      },
      width: {
        type: String,
        default: '400px',
      },
    },
    emits: ['closEexplain'],
    setup(props, { emit }) {
      //保存模块数据，关闭弹窗
      const visibleModule = ref(true);

      //关闭弹窗
      const cancelModal = () => {
        emit('closEexplain');
      };

      return {
        visibleModule,
        cancelModal,
      };
    },
  });
</script>
